		function validate_form(thisform)
		{
			with (thisform)
			{
				if (validate_required(pID,"请填写项目编号！")==false)
					{pID.focus();return false;}
				if (validate_number(pID,"项目编号必须是12位数字，格式为年月日+4流水，比如202009010001")==false)
					{pID.focus();return false;}												
								
				if (validate_required(pName,"请填写项目名！")==false)
					{pName.focus();return false;}
				
				if (validate_required(bDate,"请填写开始日期！")==false)
					{bDate.focus();return false;}
				if (validate_date(bDate,"开始日期格式不对！")==false)
					{bDate.focus();return false;}
				
				if (validate_required(eDate,"请填写结束日期！")==false)
				{eDate.focus();return false;}
				if (validate_date(eDate,"结束日期格式不对！")==false)
					{eDate.focus();return false;}
				
				if (validate_required(pLeader,"请填写项目负责人！")==false)
					{pLeader.focus();return false;}
				
				if (validate_required(mainMembers,"请填写人数！")==false)
					{mainMembers.focus();return false;}
				if (validate_realnumber(mainMembers,"人数格式不对！")==false)
					{mainMembers.focus();return false;}

				if (validate_required(fromOrg,"请填写委托单位")==false)
					{fromOrg.focus();return false;}
				
				if (validate_required(typeProject,"请填写项目类型！")==false)
					{typeProject.focus();return false;}
				if (validate_typeChoose(typeProject,"项目类型为横向或纵向，请选其一")==false)
				{typeProject.focus();return false;}
				
				if (validate_required(levelProject,"请填写项目级别！")==false)
				{levelProject.focus();return false;}
				if (validate_levelChoose(levelProject,"项目级别为国家级、省级、市级或校级，请选其一")==false)
				{levelProject.focus();return false;}
				
				if (validate_required(discipline,"请填写学科领域！")==false)
				{discipline.focus();return false;}										
			}
		}
		
		
		
		function validate_number(field, alerttxt) 
		{  
			with (field) {
	        	if (!(/^(0|[1-9]\d{11})$/.test(value))) {
	         		alert(alerttxt);
	        		return false;
	        		
	        	}
	        	else {return true;}
			}
		}
		function validate_realnumber(field,alerttxt)
		{
			with (field)
			{
				if(!(/^(0|[1-9]\d{0,1})$/.test(value)))
				{
					alert(alerttxt);
	        		return false;
				}
				else{return true;}
			}
		}
		
		function validate_date(field,alerttxt)
		{
			with (field)
			{
				if(!(/^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$/.test(value)))
				{
					alert(alerttxt);
	        		return false;
				}
				else{return true;}
			}
		}
		// 校验字段非空函数
		function validate_required(field,alerttxt)
		{
			with (field)
				{
				  if (value==null||value=="")
				    {
					  alert(alerttxt);
					  return false;
				     }
				  else {return true;}
				}
		}
		
	//补
		function validate_typeChoose(field,alerttxt){
			with(field){
				if(value=="横向"||value=="纵向"){return true;}
				else{
					alert(alerttxt);
					return false;}
			}
		}
		function validate_levelChoose(field,alerttxt){
			with(field){
				if(value=="国家级"||value=="省级"||value=="市级"||value=="校级"){return true;}
				else{
					alert(alerttxt);
					return false;
				}
				
				
			}
		}
		function validate_passOrNot(field,alerttxt){
			with(field){
				if(value=="通过"||value=="未通过"){
					return true;
				}				
				else{
					alert(alerttxt);
					return flase;
					}
			}
		}
		function validate_RankChoose(field,alerttxt){
			with(field){
				if(value=="优"||value=="良"||value=="中"||value=="差"){
					return true;
				}
				else{
					alert(alerttxt);
					return false;
				}
			}
		}
		
		function validate_money(field,alerttxt)
		{
			with(field){
				if(!(/^[0-9]\d{0,8}+(.[0-9]\d{2})?$/.test(value))){
					alert(alerttxt);
					return false;					
				}
				else{return true;}						
			}
		}
